home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.mactech.com 2010
/
ftp.mactech.com.tar
/
ftp.mactech.com
/
machack
/
Hacks97
/
WarriorsProgress.sit
/
Warrior’s Progress
/
source code
/
Source
/
Libraries
/
Files
/
FileLoop.cp
< prev
next >
Wrap
Text File
|
1997-06-28
|
527b
|
39 lines
// FileLoop.cp
#ifndef FileLoop_h
#include "FileLoop.h"
#endif
#ifndef FileNotFoundError_h
#include "FileNotFoundError.h"
#endif
FileLoop::FileLoop( Directory theDirectory )
: directory( theDirectory ),
index( 1 ),
finished( false )
{
GetInfo();
}
void FileLoop::operator++()
{
Assert( !finished );
index++;
GetInfo();
}
void FileLoop::GetInfo()
{
Assert( !finished );
try
{
info.Get( directory, index );
}
catch ( FileNotFoundError error )
{
error.Fix();
finished = true;
}
}